<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>OSESerialComs.OSESerialComs</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="www.OSEKits.org">OSEkits Experiment Control Software</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="OSESerialComs-module.html">Module&nbsp;OSESerialComs</a> ::
        Class&nbsp;OSESerialComs
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="OSESerialComs.OSESerialComs-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class OSESerialComs</h1><p class="nomargin-top"><span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">OSESerialComs</strong>
</pre>

<hr />
<p>classdocs</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="OSESerialComs.OSESerialComs-class.html#isMeasurementValueReady" class="summary-sig-name">isMeasurementValueReady</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Function: isMeasurementValueReady</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.isMeasurementValueReady">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="OSESerialComs.OSESerialComs-class.html#getMeasurementValue" class="summary-sig-name">getMeasurementValue</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Function: getMeasurementValue</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.getMeasurementValue">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="setPort"></a><span class="summary-sig-name">setPort</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">newPort</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.setPort">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="getPort"></a><span class="summary-sig-name">getPort</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.getPort">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="setBaudrate"></a><span class="summary-sig-name">setBaudrate</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">newBaudrate</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.setBaudrate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="getBaudrate"></a><span class="summary-sig-name">getBaudrate</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.getBaudrate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="setBytesize"></a><span class="summary-sig-name">setBytesize</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">newBytesize</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.setBytesize">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="getBytesize"></a><span class="summary-sig-name">getBytesize</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.getBytesize">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="setParity"></a><span class="summary-sig-name">setParity</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">newParity</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.setParity">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="getParity"></a><span class="summary-sig-name">getParity</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.getParity">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="setStopbits"></a><span class="summary-sig-name">setStopbits</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">newStopbits</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.setStopbits">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="getStopbits"></a><span class="summary-sig-name">getStopbits</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.getStopbits">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="setFlowControl"></a><span class="summary-sig-name">setFlowControl</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">newFlowcontrol</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.setFlowControl">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="getFlowControl"></a><span class="summary-sig-name">getFlowControl</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.getFlowControl">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="OSESerialComs.OSESerialComs-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Constructor port='/dev/ttyACM0', baudrate=115200, bytesize=EIGHTBITS,
      parity=PARITY_NONE, stopbits=STOPBITS_ONE, timeout=None, 
      xonxoff=False, rtscts=False, writeTimeout=None, dsrdtr=False, 
      interCharTimeout=None</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="OSESerialComs.OSESerialComs-class.html#initializePort" class="summary-sig-name">initializePort</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Function: initializePort
Description:
    Opens serial port _output_com for writing to the COM port.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.initializePort">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="OSESerialComs.OSESerialComs-class.html#closePort" class="summary-sig-name">closePort</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Function: closePort</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.closePort">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="OSESerialComs.OSESerialComs-class.html#serialReader" class="summary-sig-name">serialReader</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Function: serialReader
Description:
    serial reader listens on the serial port for incoming data.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.serialReader">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="OSESerialComs.OSESerialComs-class.html#sendConfigPacket" class="summary-sig-name">sendConfigPacket</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">sensorMode</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">configdata</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span><br />
      Function: sendConfigPacket</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.sendConfigPacket">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="OSESerialComs.OSESerialComs-class.html#_await_acknowledge" class="summary-sig-name" onclick="show_private();">_await_acknowledge</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Function: _await_acknowledge</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs._await_acknowledge">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="OSESerialComs.OSESerialComs-class.html#sendControlPacket" class="summary-sig-name">sendControlPacket</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">controlValue</span>)</span><br />
      Function: sendControlPacket</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.sendControlPacket">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="__BAUDRATES_LIST"></a><span class="summary-name">__BAUDRATES_LIST</span> = <code title="[9600, 19200, 38400, 57600, 115200]"><code class="variable-group">[</code>9600<code class="variable-op">, </code>19200<code class="variable-op">, </code>38400<code class="variable-op">, </code>57600<code class="variable-op">, </code>115200<code class="variable-group">]</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="OSESerialComs.OSESerialComs-class.html#_output_com" class="summary-name" onclick="show_private();">_output_com</a> = <code title="Serial&lt;id=0xa70496c, open=False&gt;(port=None, baudrate=9600, bytesize=8,\
 parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, ds\
rdtr=False)">Serial&lt;id=0xa70496c, open=False&gt;(port=None, baud<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="OSESerialComs.OSESerialComs-class.html#_input_com" class="summary-name" onclick="show_private();">_input_com</a> = <code title="Serial&lt;id=0x98563ac, open=False&gt;(port=None, baudrate=9600, bytesize=8,\
 parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, ds\
rdtr=False)">Serial&lt;id=0x98563ac, open=False&gt;(port=None, baudr<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_received_command_packets"></a><span class="summary-name">_received_command_packets</span> = <code title="[]"><code class="variable-group">[</code><code class="variable-group">]</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_SERIALPORT"></a><span class="summary-name">_SERIALPORT</span> = <code title="'//dev/ttyACM0'"><code class="variable-quote">'</code><code class="variable-string">//dev/ttyACM0</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_BAUDRATE"></a><span class="summary-name">_BAUDRATE</span> = <code title="115200">115200</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_BYTESIZE"></a><span class="summary-name">_BYTESIZE</span> = <code title="8">8</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_PARITY"></a><span class="summary-name">_PARITY</span> = <code title="'N'"><code class="variable-quote">'</code><code class="variable-string">N</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_STOPBITS"></a><span class="summary-name">_STOPBITS</span> = <code title="1">1</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_FLOWCONTROL"></a><span class="summary-name">_FLOWCONTROL</span> = <code title="False">False</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_input_serial_monitor_thread"></a><span class="summary-name">_input_serial_monitor_thread</span> = <code title="&lt;Thread(Thread-1, initial)&gt;">&lt;Thread(Thread-1, initial)&gt;</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_input_serial_monitor_thread_stop_flag"></a><span class="summary-name">_input_serial_monitor_thread_stop_flag</span> = <code title="False">False</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_received_measurements"></a><span class="summary-name">_received_measurements</span> = <code title="[]"><code class="variable-group">[</code><code class="variable-group">]</code></code>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="isMeasurementValueReady"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">isMeasurementValueReady</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.isMeasurementValueReady">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

Function: isMeasurementValueReady

Description:
    Checks _received_measurements for new measurements.
    
Returns:
    boolean:  True  if length of _received_measurements is greater than 0
              False otherwise

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="getMeasurementValue"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">getMeasurementValue</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.getMeasurementValue">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

Function: getMeasurementValue

Description:
    Returns the oldest measurement value received in _received_measurements
    
Returns:
    string

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Constructor port='/dev/ttyACM0', baudrate=115200, bytesize=EIGHTBITS, 
  parity=PARITY_NONE, stopbits=STOPBITS_ONE, timeout=None, xonxoff=False, 
  rtscts=False, writeTimeout=None, dsrdtr=False, interCharTimeout=None</p>
  <dl class="fields">
    <dt>Overrides:
        object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="initializePort"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">initializePort</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.initializePort">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

Function: initializePort
Description:
    Opens serial port _output_com for writing to the COM port.  Starts _input_serial_monitor_thread which monitors for incoming 
    serial data.
Returns:
    string: &quot;success&quot; on success startup
            &quot;&lt;some error&gt;&quot; on non-successfull startup

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="closePort"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">closePort</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.closePort">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

Function: closePort

Description:
    Closes output COM port and stops _input_serial_monitor_thread
    
Returns:
    string   &quot;success&quot; if no errors
             &quot;&lt;error message&gt;&quot; otherwise

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="serialReader"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">serialReader</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.serialReader">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

Function: serialReader
Description:
    serial reader listens on the serial port for incoming data.  When incoming data is received,
    one byte at a time is stored into a list that is shared with the main thread.

    Header packet definition:
     *         bits 0, 1, 2: Packet type
     *             0-2    Defines the type of packet being sent
     *            000 = NULL PACKET
     *            001 = CONFIG PACKET
     *            010 = MEASUREMENT PACKET
     *            011 = CONTROL PACKET
     *            100 = ACKNOWLEDGE PACKET
     *            101 - 111 = NULL PACKET
     *         bits 3, 4, 5: Packet size in binary.
     *             Minimum 1 byte
     *             Max 7 bytes
     *         bits 6, 7:
     *           in control packet:
     *             00 = Stop Measurement
     *             11 = Start Measurement
     *           in acknowledge packet:
     *            00 = error
     *            01 = done
     *            11 = OK
     *           in config packet:
     *            00 = thermocouple mode
     *            01 = encoder mode
     *            10 = photogate mode            
   
Returns: no return value

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="sendConfigPacket"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">sendConfigPacket</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">sensorMode</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">configdata</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.sendConfigPacket">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

Function: sendConfigPacket

Description:
    Sends a config packet through the serial connection. Waits for acknowledgement packet.
Parameters:
    sensorMode:  a two bit value indicating which sensor is to be used by the micro-controller
    configdata:  a list of single byte configuration values
Returns:
    string  value from OSESerialComs._awaitAcknowledge

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_await_acknowledge"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_await_acknowledge</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs._await_acknowledge">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

Function: _await_acknowledge

Description:
    Monitors _received_command_packets and waits for an acknowledge packet to appear.
    Will time out after reaching timeout value in OSEKitsDefine.py
    
Returns:
    string   &quot;success&quot;  upon receiving valid &quot;OK&quot; acknowledge packet
             &quot;&lt;error message&gt;&quot; otherwise

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="sendControlPacket"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">sendControlPacket</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">controlValue</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="OSESerialComs-pysrc.html#OSESerialComs.sendControlPacket">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

Function: sendControlPacket

Description:
    Sends a control packet through the serial connection. Waits for acknowledgement packet.

Returns:
    string  value from OSESerialComs._awaitAcknowledge

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="_output_com"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">_output_com</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
Serial&lt;id=0xa70496c, open=False&gt;(port=None, baudrate=9600, bytesize=8,<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
 parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, ds<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
rdtr=False)
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="_input_com"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">_input_com</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
Serial&lt;id=0x98563ac, open=False&gt;(port=None, baudrate=9600, bytesize=8,<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
 parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, ds<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
rdtr=False)
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="www.OSEKits.org">OSEkits Experiment Control Software</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Fri Jul 29 08:43:32 2011
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
